import request from "@/utils/request"


/**
 * 获取验证码
 * @returns 
 */
export function captchaImage() {
    return request({
        url: "/captchaImage",
        method: "GET",
        isToken:false,
    })
}


/**
 * 登录
 * @returns 
 */
export function login(data) {
    return request({
        url: "/user/signIn",
        method: "POST",
        data,
        isToken:false,
        //Body参数：data Query参数:params Path参数：参数直接拼接在接口路径后面
    })
}


/**
 * 注册
 * @returns 
 */
export function register(data) {
    return request({
        url: "/user/register",
        method: "POST",
        data,
        isToken:false,
    })
}


/**
 * 获取验证码
 * @returns 
 */
export function userInfo(data) {
    return request({
        url: "/user/info",
        method: "GET",
        data,
    })
}


/**
 * 获取用户信息
 * @returns 
 */
export function updateUser(data) {
    return request({
        url: "/user/info",
        method: "PUT",
        data,
    })
}


/**
 * 修改密码
 * @returns 
 */
export function updatePassword(data) {
    return request({
        url: "/user/psw",
        method: "PUT",
        data,
    })
}